home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Original Code / Pages and Transforms / TryOneInchEllipse / TryOneInchEllipse.cs next >
Encoding:
Text File  |  2001-01-15  |  632 b   |  23 lines

  1. //------------------------------------------------
  2. // TryOneInchEllipse.cs ⌐ 2001 by Charles Petzold
  3. //------------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class TryOneInchEllipse: PrintableForm
  9. {
  10.      public new static void Main()
  11.      {
  12.           Application.Run(new TryOneInchEllipse());
  13.      }
  14.      public TryOneInchEllipse()
  15.      {
  16.           Text = "Try One-Inch Ellipse";
  17.      }
  18.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  19.      {
  20.           grfx.DrawEllipse(new Pen(clr), 0, 0, grfx.DpiX, grfx.DpiY);
  21.      }
  22. }
  23.